import request from '@/utils/request'
import type { Tchannels, Tarticles, TarticlesReq } from '@/types/index'

export const channels = () => {
  return request<Tchannels>({
    url: '/channels'
  })
}

export const articles = (params: TarticlesReq) => {
  return request<Tarticles>({
    url: '/articles',
    params
  })
}